Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Variant does not contain a container
Feedback Type: Question
Product Area: Notes Client
Technical Area: Application Development
Platform: Windows
Release: 8.5
Reproducible: Always

The issue is I receive the error "Variant does not contain a container" when I try to submit a form.

There is a Contract Database with the forms CRF and Contract Header. I have modified the CRF form by adding few radio buttons , expanding the visual length of few fields and Added a field for BU contact for BU selected.

There is a field "Products" in CRF form which is Dialog list, editable and it uses formula for choices as below
@DbColumn("Notes":"NoCache";"";"(PRODUCTS)")

The similar way I have created BU_Contacts field which is Dialog list, editable and will use Enter choices[one per line] with the requires BU contact names provided in the choices.

The Contract Header form contains all the similar fields as CRF form.

I have added the BU_Contacts field of CRF form to Contract Header form also.

Now my Agent "CRFSubmit" code goes as shown below:

Dim doc As notesdocument
Dim session As notessession
Dim docid As String
Dim transid As String
Dim errmsg As String
Dim errmsgClean As String
Dim view As notesview
Dim db As notesdatabase
Dim db2 As notesdatabase
Dim upDoc As notesdocument, mailDoc As NotesDocument
Dim light As String
Dim rtitem As NotesRichTextItem
Dim webStatus As String
Dim webTitle As String
Dim webDoc As notesdocument
Dim GLBSTATUS As String
Dim history As NotesItem
Dim doFlag As String
Dim cType As String
Dim cRecord As String
Dim user As String
Dim body As NotesRichTextItem

Sub Initialize
Dim session As New notessession
Dim id As String
Set db = session.currentdatabase
Set doc = session.documentcontext
On Error Goto oops
id = doc.universalid
Call CreateCRF

Exit Sub
oops:
Print Error$

End Sub
Sub SubmitEmail (CRFDoc As NotesDocument)
Set mailDoc = db.CreateDocument
Set body = mailDoc.CreateRichTextItem( "body" )
Dim sendto As String
Dim copy1 As String
Dim Auth As String
Dim xCopy (0 To 10) As String
sendto = Auth
Auth = doc.Author(0)
ContNo = doc.Contract_No(0)
mailDoc.SendTo = "Contract_Admin"
xCopy(0) = "NOTESDEV"
'xCopy(1) = Auth
xCopy(2) = "CW-Pavan Appala"
mailDoc.CopyTo = xCopy
mailDoc.Form = "Memo"
mailDoc.Subject = "A new Contract Request Form " & ContNo & " prepared by " & Auth & " has been submitted for your review"
Call body.AppendText("Hi Contract Group,")
Call body.AddNewLine( 2, False)
Call body.AppendText("A new Contract Request Form " & ContNo & " prepared by " & Auth & " has been submitted for your review.")
Call body.AddNewline(2)
Call body.AppendText( "Please click on the link below to view the CRFs:" )
Call body.AddNewLine( 1, False)
Call body.AppendText(doc.DocLink(0))
Call body.AddNewLine( 2, False)
Call body.AppendText( "Document Links to view the CRFs:" )
Call body.AddNewLine( 1, False)
Call body.AppendText( "Link to CRF >> " )
Call body.AppendDocLink(doc, "Link to CRF")
Call body.AddNewLine( 1, False)
Call body.AppendText( "Link to Generated Contract Header >> " )
Call body.AppendDocLink(CRFDoc, "Link to Generated Contract Header")
Call body.AddNewLine( 2, False)
Call body.AppendText( "Thanks" )
Call body.AddNewLine( 1, False)
Call body.AppendText( "Helpdesk" )
Call mailDoc.Send(False)
End Sub
Sub CreateCRF
Dim docCRF As NotesDocument
Set docCRF = New NotesDocument ( db )
docCRF.Form = "CNHDR"
docCRF.Contract_No = doc.Contract_No(0)
docCRF.Contract_Type = doc.ContractType_Value(0)
docCRF.Company_Contract_No = doc.Company_Contract_No(0)
docCRF.Author = doc.Author(0)
docCRF.Products = doc.Products_Value(0)
docCRF.Amendment_No = doc.Amendment_No(0)
docCRF.No_of_Parties = doc.No_of_Parties(0)
docCRF.Requestor = doc.Requestor(0)
docCRF.Project = doc.Project(0)
docCRF.SendConTo_Value = doc.SendConTo_Value(0)
docCRF.Requestor_Tel_No = doc.Requestor_Tel_No(0)

'adding the below line
docCRF.Send_Mail_To = doc.Send_Mail_To(0)

'adding the below
docCRF.BU_Contacts = doc.BU_Contacts_Value(0)

docCRF.Appl_Biz_Flag = doc.Appl_Biz_Flag(0)
docCRF.Date_Required = doc.CreationDate(0)
docCRF.Contract_Start_Date = doc.Contract_Start_Date(0)
docCRF.Contract_End_Date = doc.Contract_End_Date(0)
docCRF.PR_Number = doc.PR_Number(0)
docCRF.PO_Number = doc.PO_Number(0)
docCRF.EOL = doc.EOL(0)
docCRF.Deleted_By = ""
docCRF.Status = "New"

docCRF.Disclosure_Reason = doc.Disclosure_Reason(0)
docCRF.Comp_Disc_Comm1_1 = doc.Comp_Disc_Comm1_1(0)
docCRF.Comp_Disc_Comm1_2 = doc.Comp_Disc_Comm1_2(0)
docCRF.Comp_Disc_Comm3_1 = doc.Comp_Disc_Comm3_1(0)
docCRF.Comp_Disc_Comm4_1 = doc.Comp_Disc_Comm4_1(0)

docCRF.Co_Name_1 = doc.Co_Name_1(0)
docCRF.Co_Name_2 = doc.Co_Name_2(0)
docCRF.Co_Name_3 = doc.Co_Name_3(0)
docCRF.Co_Name_4 = doc.Co_Name_4(0)

docCRF.Co_Address_1 = doc.Co_Address_1(0)
docCRF.Co_Address_2 = doc.Co_Address_2(0)
docCRF.Co_Address_3 = doc.Co_Address_3(0)
docCRF.Co_Address_4 = doc.Co_Address_4(0)

docCRF.Co_Cntct_Name_1 = doc.Co_Cntct_Name_1(0)
docCRF.Co_Cntct_Name_2 = doc.Co_Cntct_Name_2(0)
docCRF.Co_Cntct_Name_3 = doc.Co_Cntct_Name_3(0)
docCRF.Co_Cntct_Name_4 = doc.Co_Cntct_Name_4(0)

docCRF.AKA_1 = doc.AKA_1(0)
docCRF.AKA_2 = doc.AKA_2(0)
docCRF.AKA_3 = doc.AKA_3(0)
docCRF.AKA_4 = doc.AKA_4(0)

docCRF.Co_City_1 = doc.Co_City_1(0)
docCRF.Co_City_2 = doc.Co_City_2(0)
docCRF.Co_City_3 = doc.Co_City_3(0)
docCRF.Co_City_4 = doc.Co_City_4(0)

docCRF.Co_State_1 = doc.Co_State_1_Value(0)
docCRF.Co_State_2 = doc.Co_State_2_Value(0)
docCRF.Co_State_3 = doc.Co_State_3_Value(0)
docCRF.Co_State_4 = doc.Co_State_4_Value(0)

docCRF.Co_Zip_1 = doc.Co_Zip_1(0)
docCRF.Co_Zip_2 = doc.Co_Zip_2(0)
docCRF.Co_Zip_3 = doc.Co_Zip_3(0)
docCRF.Co_Zip_4 = doc.Co_Zip_4(0)

docCRF.Co_Country_1 = doc.Co_Country_1(0)
docCRF.Co_Country_2 = doc.Co_Country_2(0)
docCRF.Co_Country_3 = doc.Co_Country_3(0)
docCRF.Co_Country_4 = doc.Co_Country_4(0)

docCRF.Co_Phone_1 = doc.Co_Phone_1(0)
docCRF.Co_Phone_2 = doc.Co_Phone_2(0)
docCRF.Co_Phone_3 = doc.Co_Phone_3(0)
docCRF.Co_Phone_4 = doc.Co_Phone_4(0)

docCRF.Co_Loc_Inc_1 = doc.Co_Loc_Inc_1(0)
docCRF.Co_Loc_Inc_2 = doc.Co_Loc_Inc_2(0)
docCRF.Co_Loc_Inc_3 = doc.Co_Loc_Inc_3(0)
docCRF.Co_Loc_Inc_4 = doc.Co_Loc_Inc_4(0)

docCRF.Co_Email_Addr_1 = doc.Co_Email_Addr_1(0)
docCRF.Co_Email_Addr_2 = doc.Co_Email_Addr_2(0)
docCRF.Co_Email_Addr_3 = doc.Co_Email_Addr_3(0)
docCRF.Co_Email_Addr_4 = doc.Co_Email_Addr_4(0)

Call docCRF.save(True,True)
Call SubmitEmail(docCRF)
End Sub


Now when I try to Submit the newly modified form I get the Error: "Variant does not contain a container"

Any ideas would be very helpful. As I am new to this Lotus Script and Lotus notes developing.

Thanks in Advance.


Feedback number WEBB8XDCKU created by ~Nicole Prejipysonings on 08/21/2012

Status: Open
Comments:

Variant does not contain a containe... (~Nicole Prejipy... 21.Aug.12)
. . You need to find out more info abou... (~Tip Reresagene... 21.Aug.12)
. . . . I receive the error in front end (~Nicole Prejipy... 21.Aug.12)
. . . . . . It is still vague... (~Tip Reresagene... 21.Aug.12)
. . . . . . Use the debugger. (~Dan Kikiterobu... 21.Aug.12)
. . Possible cause (~Ned Nimfanakon... 21.Aug.12)
. . . . I guess may be because of the below... (~Nicole Prejipy... 23.Aug.12)
. . . . . . You don't need rich text for multi-... (~Ned Nimfanakon... 23.Aug.12)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS